package com.summer.immutableObject;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;


public class ImmutableObject {
	
	public static void main(String[] args) {
		
	}
	
	static final class Location {
		private final int x;
		private final int y;
		public Location(int x,int y){
			this.x=x;
			this.y=y;
		}
		
		public int getX(){
			return x;
		}
		
		public int getY(){
			return y;
		}
	}
	
	static class Manipulator{
		private Map<String,Location> map = new ConcurrentHashMap<String, Location>();
		public void updateLocation(String id,int x,int y){
			map.put(id, new Location(x,y));
		}
	}
}
